package com.breezelin.freshmarket.network.asynctasks;

/**
 * Created by Breeze Lin
 * 2:10 2016/5/19
 * 1linyufeng1@gmail.com
 */

import com.breezelin.freshmarket.entities.rsp.QueryRsp;
import com.breezelin.freshmarket.network.FMAsyncTask;
import com.breezelin.freshmarket.network.apis.ContentApi;

/**
 * 分类产品请求任务
 */
public abstract class TypeQueryTask extends FMAsyncTask<Void, Void, QueryRsp> {

	/**
	 * 类型
	 */
	private String type;
	/**
	 * 页码
	 */
	private int pageNo;

	/**
	 * @param type 查询类型
	 */
	protected TypeQueryTask(String type, int pageNo) {
		super(ContentApi.QUERY);
		this.type = type;
		this.pageNo = pageNo;
	}

	@Override
	protected QueryRsp doInBackground(Void... params) {
		return ContentApi.queryType(type, pageNo);
	}
}
